﻿using Core.Domain.Common;
using System;
using System.Collections.Generic;

namespace Core.Domain.Companys
{
    /// <summary>
    /// 职位实体
    /// </summary>
    public partial class Jobs : BaseEntity
    {
        /// <summary>
        /// 职位属性
        /// </summary>
        private ICollection<ExtendedAttribute> _jobAttribute;

        /// <summary>
        /// 公司编号
        /// </summary>
        public int CompanyId { get; set; }

        /// <summary>
        /// 所属类别
        /// </summary>
        public int CategoryId { get; set; }
        /// <summary>
        /// 职位名称
        /// </summary>
        public string Name { get;set; }

        /// <summary>
        /// 工作方式
        /// </summary>
        public int WrokTypeId { get;set; }

        /// <summary>
        /// 工作描述
        /// </summary>
        public string Memo { get; set; }

        /// <summary>
        /// 投递次数
        /// </summary>
        public int Times { get;set; }

        /// <summary>
        /// 是否删除
        /// </summary>
        public bool Deleted { get; set; }

        /// <summary>
        /// 是否激活
        /// </summary>
        public bool Active { get; set; }

        /// <summary>
        /// 创建时间
        /// </summary>
        public DateTime CreatedOn { get; set; }

        /// <summary>
        /// 职位属性
        /// </summary>
        public virtual ICollection<ExtendedAttribute> JobAttribute
        {
            get { return _jobAttribute ?? (_jobAttribute = new List<ExtendedAttribute>()); }
            protected set { _jobAttribute = value; }
        }

        /// <summary>
        /// 职位工作方式
        /// </summary>
        public WorkType JobWorkType
        {
            get
            {
                return (WorkType)this.WrokTypeId;
            }
            set
            {
                this.WrokTypeId = (int)value;
            }
        }

    }
}
